sudo useradd kafka -m
sudo passwd kafka
sudo adduser kafka sudo
su -l kafka

mkdir ~/Downloads

sudo apt update && sudo apt install -y curl
sudo apt install ruby ruby-dev build-essential
sudo gem install kafkat

curl "https://downloads.apache.org/kafka/2.1.1/kafka_2.11-2.1.1.tgz" -o ~/Downloads/kafka.tgz

mkdir ~/kafka && cd ~/kafka

tar -xvzf ~/Downloads/kafka.tgz --strip 1



# 限制用户
sudo deluser kafka sudo
sudo passwd kafka -l
sudo su - kafka
sudo passwd kafka -u
